<template>
  <div class="sousuo">
    <div class="booktop">
      <div class="top">
        <div class="top1">
          <div class="imgs" @click="toindex()">
            <img src="../../assets/images/logon.png" alt="" />
          </div>
          <div class="lefts" @click="toindex()">
            <div></div>
            <div class="lefts1">浙江省非物质文化<br />数字文献中心</div>
            <div class="lefts2">
              ZhejiangProvinceIntangibleCultureDigitalLiteratureCenter
            </div>
          </div>
          <div class="rights">
            <div></div>
            <usertbtn></usertbtn>
            <div class="ris3">
              <el-form
                :inline="true"
                :model="formInline"
                class="demo-form-inline"
                style="width: 100%; display: flex; height: 56px"
              >
                <el-form-item
                  style="width: 382px; height: 56px; margin-bottom: 0"
                >
                  <el-input
                    v-model="keyword"
                    placeholder="输入关键词搜索"
                    style="width: 382px; height: 56px"
                    @keyup.enter.native="sousuo()"
                  >
                    <img
                      @click="sousuo()"
                      slot="append"
                      src="../../assets/images/sousuo.png"
                      alt=""
                    />
                  </el-input>
                </el-form-item>
              </el-form>
            </div>
          </div>
        </div>
      </div>
      <div class="navs">
        <div
          class="navs1"
          v-for="(item, index) in navslist"
          :key="item.id"
          :class="item.id == actives ? 'active' : ''"
          @click="totab(item.id, item.path)"
        >
          <el-dropdown trigger="click" @command="handleCommand">
            <span
              class="el-dropdown-link"
              style="display: flex; flex-direction: column; align-items: center"
            >
              <div>{{ item.name }}</div>
              <i
                v-if="index <= 4"
                class="el-icon-caret-bottom el-icon-caret-top"
              ></i>
            </span>
            <el-dropdown-menu slot="dropdown">
              <el-dropdown-item
                :command="item1.id"
                v-for="(item1, index1) in item.children"
                :key="item1.id"
                >{{ item1.names }}</el-dropdown-item
              >
            </el-dropdown-menu>
          </el-dropdown>
        </div>
      </div>
    </div>
    <div class="riao" v-if="actives == 1">
      <div
        class="ria"
        v-for="item in time1"
        :key="item.id"
        :class="riaact == item.id ? 'riaactive' : ''"
        @click="tiatab(item.id)"
      >
        {{ item.mc }}
      </div>
    </div>
    <div class="riao" v-if="actives == 2">
      <div
        class="ria"
        v-for="item in time2"
        :key="item.id"
        :class="riaact1 == item.id ? 'riaactive' : ''"
        @click="tiatab1(item.id)"
      >
        {{ item.mc }}
      </div>
    </div>
    <div class="riao" v-if="actives == 4">
      <div
        class="ria"
        v-for="item in time3"
        :key="item.id"
        :class="riaact3 == item.id ? 'riaactive' : ''"
        @click="tiatab3(item.id)"
      >
        {{ item.mc }}
      </div>
    </div>
    <div class="cont">
      <div class="s11">
        <div class="s11-1">
          <img src="../../assets/images/s2.png" alt="" />
          <div class="ziti">我的收藏</div>
        </div>
      </div>
      <div class="s12">
        <div v-if="actives == 0">
          <div
            class="cont2"
            v-for="(item, index) in sclist"
            :key="item.id"
            
            v-if="item != null"
          >
            <div class="left" style="width: 1px">
              <!-- <el-checkbox
                    :key="1"
                    :label="1"
                ></el-checkbox> -->
            </div>
            <div class="righ" style="width: calc(100% - 1px)">
              <!-- <div class="book1">
                    <img src="../../assets/images/book1.png" alt="" />
                </div> -->
              <div class="book" style="width: 100%; margin-left: 0px">
                <div class="mcs">
                  <div class="mc" @click="towenxians(item.wxlx, item.id)">
                    {{ item.mc }}
                    <span
                      style="font-size: 12px; color: #911f23; font-weight: 400"
                      >({{ item.wxlxmc }})</span
                    >
                    <span></span>
                  </div>
                  <div class="mc1" @click="qxshoucang(item.wxlx,item.id)">
                    <img src="../../assets/images/s2.png" alt="" />
                    <div>收藏</div>
                  </div>
                  <!-- <div
                        class="mc1"
                        @click="qxshoucang(45, item.fyclassDataID, item)"
                        v-else
                    >
                        <img src="../../assets/images/s2.png" alt="" />
                        <div>收藏</div>
                    </div> -->
                </div>
                <div class="fx" @click="towenxians(item.wxlx, item.id)">
                  <span v-if="item.cbs">{{ item.cbs }}</span>
                  <el-divider direction="vertical" v-if="item.cbs"></el-divider>
                  <span v-if="item.zz">{{ item.zz }}</span>
                  <el-divider direction="vertical" v-if="item.zz"></el-divider>
                  <span>{{ item.ly ? item.ly : "" }}</span>
                  <el-divider direction="vertical" v-if="item.ly"></el-divider>
                  <span>{{ item.jb ? item.jb : "" }}</span>
                  <el-divider direction="vertical" v-if="item.jb"></el-divider>
                  <span v-if="item.pc">第{{ item.pc }}批</span>
                  <el-divider direction="vertical" v-if="item.pc"></el-divider>
                  <span v-if="item.gs">格式：{{ item.gs }}</span>
                  <el-divider direction="vertical" v-if="item.gs"></el-divider>
                  <span v-if="item.xmlb">{{ item.xmlb }}</span>
                  <el-divider
                    direction="vertical"
                    v-if="item.xmlb"
                  ></el-divider>
                  <span v-if="item.sj">{{ item.sj }}</span>
                </div>
                <div @click="towenxians(item.wxlx, item.id)" class="nr" v-html="item.jj"></div>
              </div>
            </div>
          </div>
        </div>
        <div v-if="actives == 1">
          <div
            class="cont2"
            v-for="(item, index) in sclist"
            :key="item.id"
            
            v-if="item != null"
          >
            <div class="left" style="width: 1px">
              <!-- <el-checkbox
                    :key="1"
                    :label="1"
                ></el-checkbox> -->
            </div>
            <div class="righ" style="width: calc(100% - 1px)">
              <!-- <div class="book1">
                    <img src="../../assets/images/book1.png" alt="" />
                </div> -->
              <div class="book" style="width: 100%; margin-left: 0px">
                <div class="mcs">
                  <div class="mc" @click="towenxians(item.wxlx, item.id)">
                    {{ item.mc }}
                    <span
                      style="font-size: 12px; color: #911f23; font-weight: 400"
                      >({{ item.wxlxmc }})</span
                    >
                    <span></span>
                  </div>
                  <div class="mc1" @click="qxshoucang(item.wxlx,item.id)">
                    <img src="../../assets/images/s2.png" alt="" />
                    <div>收藏</div>
                  </div>
                  <!-- <div
                        class="mc1"
                        @click="qxshoucang(45, item.fyclassDataID, item)"
                        v-else
                    >
                        <img src="../../assets/images/s2.png" alt="" />
                        <div>收藏</div>
                    </div> -->
                </div>
                <div class="fx" @click="towenxians(item.wxlx, item.id)">
                  <span v-if="item.cbs">{{ item.cbs }}</span>
                  <el-divider direction="vertical" v-if="item.cbs"></el-divider>
                  <span v-if="item.zz">{{ item.zz }}</span>
                  <el-divider direction="vertical" v-if="item.zz"></el-divider>
                  <span>{{ item.ly ? item.ly : "" }}</span>
                  <el-divider direction="vertical" v-if="item.ly"></el-divider>
                  <span>{{ item.jb ? item.jb : "" }}</span>
                  <el-divider direction="vertical" v-if="item.jb"></el-divider>
                  <span v-if="item.pc">第{{ item.pc }}批</span>
                  <el-divider direction="vertical" v-if="item.pc"></el-divider>
                  <span v-if="item.gs">格式：{{ item.gs }}</span>
                  <el-divider direction="vertical" v-if="item.gs"></el-divider>
                  <span v-if="item.xmlb">{{ item.xmlb }}</span>
                  <el-divider
                    direction="vertical"
                    v-if="item.xmlb"
                  ></el-divider>
                  <span  v-if="item.sj">{{ item.sj }}</span>
                </div>
                <div @click="towenxians(item.wxlx, item.id)" class="nr" v-html="item.jj"></div>
              </div>
            </div>
          </div>
        </div>
        <div v-if="actives == 2">
          <div
            class="cont2"
            v-for="(item, index) in sclist"
            :key="item.id"
            
          >
            <div class="left" style="width: 1px">
              <!-- <el-checkbox
                        :key="item.id"
                        :label="item.id"
                    ></el-checkbox> -->
            </div>
            <div class="righ" style="width: calc(100% - 1px)">
              <div class="book1" v-if="item.pic" @click="towenxians(item.wxlx, item.id)">
                <img :src="item.pic" alt="" />
              </div>
              <div class="book" :style="{ width: item.pic ? '95%' : '100%' }">
                <div class="mcs">
                  <div class="mc" @click="towenxians(item.wxlx, item.id)">
                    {{ item.mc }}
                    <span
                      style="font-size: 12px; color: #911f23; font-weight: 400"
                      >({{ item.wxlxmc }})</span
                    >
                    <span></span>
                  </div>
                  <div class="mc1" @click="qxshoucang(item.wxlx,item.id)">
                    <img src="../../assets/images/s2.png" alt="" />
                    <div>收藏</div>
                  </div>
                </div>
                <div class="fx" @click="towenxians(item.wxlx, item.id)">
                  <span v-if="item.cbs">{{ item.cbs }}</span>
                  <el-divider direction="vertical" v-if="item.cbs"></el-divider>
                  <span v-if="item.zz">{{ item.zz }}</span>
                  <el-divider direction="vertical" v-if="item.zz"></el-divider>
                  <span>{{ item.ly ? item.ly : "" }}</span>
                  <el-divider direction="vertical" v-if="item.ly"></el-divider>
                  <span>{{ item.jb ? item.jb : "" }}</span>
                  <el-divider direction="vertical" v-if="item.jb"></el-divider>
                  <span v-if="item.pc">第{{ item.pc }}批</span>
                  <el-divider direction="vertical" v-if="item.pc"></el-divider>
                  <span v-if="item.gs">格式：{{ item.gs }}</span>
                  <el-divider direction="vertical" v-if="item.gs"></el-divider>
                  <span v-if="item.xmlb">{{ item.xmlb }}</span>
                  <el-divider
                    direction="vertical"
                    v-if="item.xmlb"
                  ></el-divider>
                  <span v-if="item.sj">{{ item.sj }}</span>
                </div>
                <div @click="towenxians(item.wxlx, item.id)" class="nr" v-html="item.jj"></div>
              </div>
            </div>
          </div>
        </div>
        <div v-if="actives == 3">
          <div
            class="cont2"
            v-for="(item, index) in sclist"
            :key="item.id"
           
            v-if="item != null"
          >
            <div class="left" style="width: 1px">
              <!-- <el-checkbox
                    :key="1"
                    :label="1"
                ></el-checkbox> -->
            </div>
            <div class="righ" style="width: calc(100% - 1px)">
              <div class="book1" v-if="item.pic"  @click="towenxians(item.wxlx, item.id)">
                <img :src="item.pic" alt="" />
              </div>
              <div class="book">
                <div class="mcs">
                  <div class="mc"  @click="towenxians(item.wxlx, item.id)">
                    {{ item.mc }}
                    <span
                      style="font-size: 12px; color: #911f23; font-weight: 400"
                      >({{ item.wxlxmc }})</span
                    >
                    <span></span>
                  </div>
                  <div class="mc1" @click="qxshoucang(item.wxlx,item.id)">
                    <img src="../../assets/images/s2.png" alt="" />
                    <div>收藏</div>
                  </div>
                  <!-- <div
                        class="mc1"
                        @click="qxshoucang(45, item.fyclassDataID, item)"
                        v-else
                    >
                        <img src="../../assets/images/s2.png" alt="" />
                        <div>收藏</div>
                    </div> -->
                </div>
                <div class="fx"  @click="towenxians(item.wxlx, item.id)">
                  <span v-if="item.cbs">{{ item.cbs }}</span>
                  <el-divider direction="vertical" v-if="item.cbs"></el-divider>
                  <span v-if="item.zz">{{ item.zz }}</span>
                  <el-divider direction="vertical" v-if="item.zz"></el-divider>
                  <span>{{ item.ly ? item.ly : "" }}</span>
                  <el-divider direction="vertical" v-if="item.ly"></el-divider>
                  <span>{{ item.jb ? item.jb : "" }}</span>
                  <el-divider direction="vertical" v-if="item.jb"></el-divider>
                  <span v-if="item.pc">第{{ item.pc }}批</span>
                  <el-divider direction="vertical" v-if="item.pc"></el-divider>
                  <span v-if="item.gs">格式：{{ item.gs }}</span>
                  <el-divider direction="vertical" v-if="item.gs"></el-divider>
                  <span v-if="item.xmlb">{{ item.xmlb }}</span>
                  <el-divider
                    direction="vertical"
                    v-if="item.xmlb"
                  ></el-divider>
                  <span v-if="item.sj">{{ item.sj }}</span>
                </div>
                <div  @click="towenxians(item.wxlx, item.id)" class="nr" v-html="item.jj"></div>
              </div>
            </div>
          </div>
        </div>
        <div v-if="actives == 4">
          <div
            class="cont2"
            v-for="(item, index) in sclist"
            :key="item.id"
            
            v-if="item != null"
          >
            <div class="left" style="width: 1px">
              <!-- <el-checkbox
                    :key="1"
                    :label="1"
                ></el-checkbox> -->
            </div>
            <div class="righ" style="width: calc(100% - 1px)">
              <!-- <div class="book1">
                    <img src="../../assets/images/book1.png" alt="" />
                </div> -->
              <div class="book" style="width: 100%; margin-left: 0px">
                <div class="mcs">
                  <div class="mc" @click="towenxians(item.wxlx, item.id)">
                    {{ item.mc }}
                    <span
                      style="font-size: 12px; color: #911f23; font-weight: 400"
                      >({{ item.wxlxmc }})</span
                    >
                    <span></span>
                  </div>
                  <div class="mc1" @click="qxshoucang(item.wxlx,item.id)">
                    <img src="../../assets/images/s2.png" alt="" />
                    <div>收藏</div>
                  </div>
                  <!-- <div
                        class="mc1"
                        @click="qxshoucang(45, item.fyclassDataID, item)"
                        v-else
                    >
                        <img src="../../assets/images/s2.png" alt="" />
                        <div>收藏</div>
                    </div> -->
                </div>
                <div class="fx" @click="towenxians(item.wxlx, item.id)">
                  <span v-if="item.cbs">{{ item.cbs }}</span>
                  <el-divider direction="vertical" v-if="item.cbs"></el-divider>
                  <span v-if="item.zz">{{ item.zz }}</span>
                  <el-divider direction="vertical" v-if="item.zz"></el-divider>
                  <span>{{ item.ly ? item.ly : "" }}</span>
                  <el-divider direction="vertical" v-if="item.ly"></el-divider>
                  <span>{{ item.jb ? item.jb : "" }}</span>
                  <el-divider direction="vertical" v-if="item.jb"></el-divider>
                  <span v-if="item.pc">第{{ item.pc }}批</span>
                  <el-divider direction="vertical" v-if="item.pc"></el-divider>
                  <span v-if="item.gs">格式：{{ item.gs }}</span>
                  <el-divider direction="vertical" v-if="item.gs"></el-divider>
                  <span v-if="item.xmlb">{{ item.xmlb }}</span>
                  <el-divider
                    direction="vertical"
                    v-if="item.xmlb"
                  ></el-divider>
                  <span v-if="item.sj">{{ item.sj }}</span>
                </div>
                <div @click="towenxians(item.wxlx, item.id)" class="nr" v-html="item.jj"></div>
              </div>
            </div>
          </div>
        </div>

        <div class="cont3">
          <el-pagination
            background
            layout="prev, pager, next"
            :total="total"
            @current-change="handleCurrentChange"
            :page-size="value * 1"
          >
          </el-pagination>
          <div style="width:100%;height150px">&emsp;</div>
        </div>
      </div>
    </div>

    <footbtn></footbtn>
  </div>
</template>
<style scoped  lang="scss">
// 分页
::v-deep .el-pagination.is-background .el-pager li {
  background-color: #fff;
}
::v-deep .el-pagination.is-background .el-pager li:not(.disabled).active {
  background-color: #911f23;
  color: #fff;
}
::v-deep .el-pagination.is-background .el-pager li:not(.disabled):hover {
  color: #911f23;
}
::v-deep .el-input {
  display: flex;
  justify-content: center;
  color: #333333;
}
::v-deep .el-input--prefix .el-input__inner {
  width: 305px;
  border: 0px;
}
//搜索框
::v-deep .el-input-group > .el-input__inner {
  height: 56px;
  border: 0px;
}
::v-deep .el-input-group__append {
  border: none !important;
  background-color: #fff;
  padding: 0 45px 0 10px;
}
::v-deep .el-input-group__append img {
  width: 32px;
  height: 32px;
  padding-top: 12px;
  cursor: pointer;
}
::v-deep .el-button--primary {
  background-color: #911f23;
  border-color: #911f23;
  border-radius: 8px;
  height: 56px;
  width: 112px;
  margin-left: 16px;
}
::v-deep .el-form--inline .el-form-item {
  margin-right: 0;
}
::v-deep .el-divider--vertical {
  // height: 40px;
  background-color: #999999;
}
::v-deep .el-dropdown-menu {
  width: 130px;
}

.sousuo {
  width: 100%;
  .riao {
    width: 1400px;
    margin: 20px auto 0;
    display: flex;
    // padding: 0 0 24px;
    .ria {
      padding: 8px 16px;
      border-radius: 4px;
      background-color: #e8e8e8;
      margin-right: 20px;
      font-size: 14px;
      font-family: Source Han Sans CN-Regular, Source Han Sans CN;
      font-weight: 400;
      color: #333333;
      cursor: pointer;
    }
    .riaactive {
      background-color: #ede1e2;
      color: #911f23;
    }
  }
  .riao1 {
    width: 100%;
    display: flex;
    justify-content: space-between;
  }
  .booktop {
    width: 100%;
    height: 278px;
    background: url("../../assets/images/booktop.png") no-repeat;
    background-size: 100% 100%;
    .top {
      width: 1400px;
      height: 176px;
      margin: 0 auto;
      // background-color: #F7F7F8;
      .top1 {
        position: relative;
        width: calc(100% - 0px);
        margin: 0 auto;
        height: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
        // background-color: pink;
        .imgs {
          position: absolute;
          top: 0;
          width: 138px;
          height: 176px;
          z-index: 100;
          cursor: pointer;
          img {
            width: 100%;
            height: 100%;
          }
        }
        .lefts {
          display: flex;
          flex-direction: column;
          justify-content: space-between;
          height: 100%;
          margin-left: 170px;
          cursor: pointer;
          .lefts1 {
            font-size: 24px;
            font-family: Source Han Sans CN-Regular, Source Han Sans CN;
            font-weight: 400;
            color: #333333;
            // line-height: 35px;
          }
          .lefts2 {
            font-size: 14px;
            font-family: Source Han Sans CN-Regular, Source Han Sans CN;
            font-weight: 400;
            color: #666666;
            padding-bottom: 12px;
          }
        }
        .rights {
          position: relative;
          display: flex;
          flex-direction: column;
          align-items: flex-end;
          justify-content: space-between;
          // padding-bottom: 40px;
          height: 100%;

          .ris3 {
            // width: 362px;
            // margin-top: 37px;
          }
          .ri {
            padding-right: 30px;
          }
          .ri1 {
            display: flex;
            justify-content: center;
            align-items: center;
            width: 68px;
            height: 38px;
            background: #911f23;
            border-radius: 8px 8px 8px 8px;
            opacity: 1;
            color: #fff;
            cursor: pointer;
          }
        }
      }
    }
    .navs {
      width: 1400px;
      height: 76px;
      display: flex;
      align-items: center;
      justify-content: space-around;
      margin: 30px auto 0;
      .navs1 {
        width: 175px;
        height: 72px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        cursor: pointer;
        .el-dropdown-link {
          font-size: 18px;
          font-family: Source Han Sans CN-Regular, Source Han Sans CN;
          font-weight: 400;
          color: #333333;
        }
      }
      .active {
        background-color: #ffff;
      }
    }
  }
  .cont {
    width: 1400px;
    margin: 24px auto 90px;
    display: flex;
    justify-content: space-between;
    min-height: 50vh;
    .s11 {
      width: 180px;
      min-height: 300px;
      .s11-1 {
        width: 100%;
        min-height: 300px;
        background-color: #fff;
        border-radius: 6px;
        padding: 24px 30px;
        display: flex;
        // align-items: center;
        img {
          width: 18px;
          height: 18px;
        }
        .ziti {
          font-size: 14px;
          color: #666666;
          padding-left: 6px;
        }
      }
    }
    .s12 {
      width: 1140px;
      .cont2 {
        width: calc(100% - 32px);
        padding: 16px;
        background: #ffffff;
        border-radius: 8px 8px 8px 8px;
        opacity: 1;
        margin-bottom: 12px;
        display: flex;
        cursor: pointer;
        .left {
          width: 5%;
        }
        .righ {
          display: flex;
          width: 95%;
          .book1 {
            width: 114px;
            img {
              width: 114px;
              height: 160px;
            }
          }
          .book {
            width: calc(100% - 130px);
            margin-left: 16px;
            .mcs {
              width: 100%;
              display: flex;
              justify-content: space-between;
              // align-items: center;
              .mc {
                height: 24px;
                font-size: 18px;
                font-family: Source Han Sans CN-Regular, Source Han Sans CN;
                font-weight: 600;
                color: #3d3d3d;
              }
              .mc1 {
                display: flex;
                align-items: center;
                font-size: 12px;
                font-family: Source Han Sans CN-Regular, Source Han Sans CN;
                font-weight: 400;
                color: #333333;
                img {
                  width: 16px;
                  height: 16px;
                }
              }
            }
            .fx {
              margin-top: 16px;
              font-size: 12px;
              font-family: Source Han Sans CN-Regular, Source Han Sans CN;
              font-weight: 400;
              color: #666666;
            }
            .nr {
              width: 100%;
              margin-top: 16px;
              font-size: 12px;
              font-family: Source Han Sans CN-Regular, Source Han Sans CN;
              font-weight: 400;
              color: #666666;
              line-height: 20px;
              display: -webkit-box;
              -webkit-line-clamp: 3;
              -webkit-box-orient: vertical;
              overflow: hidden;
            }
          }
        }
      }
      .cont3 {
        margin-top: 16px;
        text-align: center;
        // transform: translateX(-30%);
      }
    }
  }
  .foots {
    display: flex;
    position: fixed;
    bottom: 0;
  }
}
</style>

<script>
import footbtn from "../../components/foot/index.vue";
import usertbtn from "../../components/user/index.vue";
import { geturersc,getqxsc } from "@/api/api.js";
export default {
  data() {
    return {
      value: 10,
      total: 20,
      actives: 0,

      formInline: {
        user: "",
      },
      navslist: [
        {
          id: 0,
          name: "综合",
          path: "/s1",
          children: [],
        },
        {
          id: 1,
          name: "数字档案",
          path: "/s2",
          children: [
            // {id:0,names:'普查文献'}
          ],
        },
        {
          id: 2,
          name: "集成志书",
          path: "/s5",
          children: [
            // {id:0,names:'普查文献'}
          ],
        },
        {
          id: 3,
          name: "音像资料",
          path: "/s6",
          children: [
            // {id:0,names:'普查文献'}
          ],
        },
        {
          id: 4,
          name: "理论研究",
          path: "s7",
          children: [
            // {id:0,names:'普查文献'}
          ],
        },
      ],
      gglx: 0,
      keyword: "",
      type: "",
      pageIndex: 1,
      pageSize: 10,
      sclist: [],
      time1: [
        { id: 5, mc: "普查线索档案", fid: 2, num: 0, children: [] },
        { id: 6, mc: "调查项目档案", fid: 2, num: 0, children: [] },
        { id: 7, mc: "非遗项目申报书", fid: 3, num: 0, children: [] },
        { id: 8, mc: "传承人申报书", fid: 3, num: 0, children: [] },
        { id: 9, mc: "基地申报书", fid: 3, num: 0, children: [] },
        // {id: 28, mc: "会议档案", fid: 4, num: 0, children: []},
        // {id: 29, mc: "活动档案", fid: 4, num: 0, children: []},
        { id: 30, mc: "文件档案", fid: 4, num: 0, children: [] },
      ],
      time2: [
        { id: 45, mc: "书籍", fid: 2, num: 0, children: [] },
        { id: 46, mc: "简报", fid: 2, num: 0, children: [] },
        { id: 47, mc: "期刊", fid: 3, num: 0, children: [] },
      ],
      time3: [
        { id: 69, mc: "论文", fid: 2, num: 0, children: [] },
        { id: 70, mc: "课题", fid: 2, num: 0, children: [] },
      ],
      riaact: 5,
      riaact1: 45,
      riaact3: 69,
      yhm:{}
    };
  },
  created() {
    this.yhm = JSON.parse(sessionStorage.getItem("loginInfo"))
      ? JSON.parse(sessionStorage.getItem("loginInfo"))
      : "";
    this.getusersc();
  },
  mounted() {
    // this.drawChart()
  },
  methods: {
    async qxshoucang(lx, id) {
      let res = await getqxsc({
        zylx: lx,
        zyid: id,
        yhid: this.yhm.id,
      });
      if (res.code == 0) {
        this.$message({
          message: "取消收藏成功",
          type: "success",
        });
        this.getusersc()
      } else {
        this.$message.error(res.msg);
      }
    },
    tiatab(id) {
      this.riaact = id;
      this.type = id;
      this.getusersc();
    },
    tiatab1(id) {
      this.riaact1 = id;
      this.type = id;
      this.getusersc();
    },
    tiatab3(id) {
      this.riaact3 = id;
      this.type = id;
      this.getusersc();
    },
    async getusersc() {
      let res = await geturersc({
        pageIndex: this.pageIndex,
        pageSize: this.pageSize,
        keyword: this.keyword,
        type: this.type,
      });
    
      this.sclist = res.list;
      this.total = res.total;
    },
    toindex() {
      sessionStorage.setItem("ids", 0);
      this.$router.push("/index");
    },
    sousuo() {
      this.getusersc();
    },

    totab(id, url) {
      this.keyword = "";
      this.pageIndex = 1;
      this.actives = id;
      this.riaact = 5;
      this.riaact1 = 45;
      this.riaact3 = 69;

      if (id == 1) {
        this.type = 5;
        this.getusersc();
      } else if (id == 0) {
        this.type = "";
        this.getusersc();
      } else if (id == 2) {
        this.type = 45;
        this.getusersc();
      } else if (id == 4) {
        this.type = 69;
        this.getusersc();
      } else if (id == 3) {
        this.type = 57;
        this.getusersc();
      }
      sessionStorage.setItem("scmax", id);
    },
    handleCommand(e, row) {
    },
    handleCurrentChange(val) {
      this.sclist = [];
      this.pageIndex = val;
      this.getusersc();
    },
    towenxians(id, lx) {
      if (id == 7) {
        const { href } = this.$router.resolve({
          path: "/literature",
          query: { id: id, lx: lx * 1 },
        });
        window.open(href, "_blank");
      } else if (id == 8) {
        const { href } = this.$router.resolve({
          path: "/ccr",
          query: { id: id, lx: lx },
        });
        window.open(href, "_blank");
      } else if (id == 28) {
        const { href } = this.$router.resolve({
          path: "/huiyi",
          query: { id: id, lx: lx },
        });
        window.open(href, "_blank");
      } else if (id == 9) {
        const { href } = this.$router.resolve({
          path: "/jidi",
          query: { id: id, lx: lx },
        });
        window.open(href, "_blank");
      } else if (id == 29) {
        const { href } = this.$router.resolve({
          path: "/hd",
          query: { id: id, lx: lx },
        });
        window.open(href, "_blank");
      } else if (id == 6) {
        const { href } = this.$router.resolve({
          path: "/txxm",
          query: { id: id, lx: lx },
        });
        window.open(href, "_blank");
      } else if (id == 5) {
        const { href } = this.$router.resolve({
          path: "/pcxs",
          query: { id: id, lx: lx },
        });
        window.open(href, "_blank");
      } else if (id == 30) {
        const { href } = this.$router.resolve({
          path: "/pucha",
          query: { id: id, lx: lx },
        });
        window.open(href, "_blank");
      } else if (id == 47) {
        const { href } = this.$router.resolve({
          path: "/jb",
          query: { id: lx, lx: id },
        });
        window.open(href, "_blank");
      } else if (id == 46) {
        const { href } = this.$router.resolve({
          path: "/qk",
          query: { id: lx, lx: id },
        });
        window.open(href, "_blank");
      } else if (id == 69) {
        const { href } = this.$router.resolve({
          path: "/lw",
          query: { id: id, lx: lx },
        });
        window.open(href, "_blank");
      } else if (id == 70) {
        const { href } = this.$router.resolve({
          path: "/kt",
          query: { id: id, lx: lx },
        });
        window.open(href, "_blank");
      } else if (id == 59) {
        const { href } = this.$router.resolve({
          path: "/audio",
          query: { id: lx, lx: id },
        });
        window.open(href, "_blank");
      } else if (id == 61) {
        const { href } = this.$router.resolve({
          path: "/video",
          query: { id: lx, lx: id },
        });
        window.open(href, "_blank");
      } else if (id == 60) {
        const { href } = this.$router.resolve({
          path: "/video",
          query: { id: lx, lx: id },
        });
        window.open(href, "_blank");
      } else if (id == 62) {
        const { href } = this.$router.resolve({
          path: "/video",
          query: { id: lx, lx: id },
        });
        window.open(href, "_blank");
      } else if (id == 63) {
        const { href } = this.$router.resolve({
          path: "/video",
          query: { id: lx, lx: id },
        });
        window.open(href, "_blank");
      } else if (id == 64) {
        const { href } = this.$router.resolve({
          path: "/video",
          query: { id: lx, lx: id },
        });
        window.open(href, "_blank");
      } else if (id == 65) {
        const { href } = this.$router.resolve({
          path: "/video",
          query: { id: lx, lx: id },
        });
        window.open(href, "_blank");
      } else if (id == 66) {
        const { href } = this.$router.resolve({
          path: "/video",
          query: { id: lx, lx: id },
        });
        window.open(href, "_blank");
      } else if (id == 67) {
        const { href } = this.$router.resolve({
          path: "/video",
          query: { id: lx, lx: id },
        });
        window.open(href, "_blank");
      } else if (id == 45) {
        const { href } = this.$router.resolve({
          path: "/BookDetails",
          query: { lx: lx, id: id },
        });
        window.open(href, "_blank");
        // const {href} = this.$router.resolve({ path: "/BookDetails", query: { id: lx,id:lx } });
        // window.open(href, '_blank');
      }
    },
  },
  computed: {},
  components: {
    footbtn,
    usertbtn,
  },
};
</script>
